package cn.com.guage.dtm.scanner;

import java.util.Scanner;

public class ScannerHasNextExample {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一些单词，以空格分隔：");
        while (scanner.hasNext()) {
            String word = scanner.next();
            System.out.println("你输入的单词是：" + word);
        }
        scanner.close();
    }
}